
#ifndef ANALISADOR_H
#define ANALISADOR_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define OP_DESCART		101
#define OP_LOGICO		102
#define OP_DELIMIT		103
#define OP_CARAC_ESP	104
#define OP_RELAC		105
#define OP_ARITM		106

#define MUDA		80
#define REDUZ		81
#define ACEITA		999
#define ERRO		666
#define SIMBOLO 2

#define ABRE_PAR	1
#define FECHA_PAR	2
#define ABRE_CHAVE	3
#define FECHA_CHAVE	4
#define IGUAL		5
#define VIRGULA		6
#define PONTO_VIRGULA	7
#define INT			8
#define CHAR		9
#define FLOAT		10
#define ID			11
#define STR			12
#define NUM			13
#define TERM_FOR	14
#define TERM_IF		15
#define TERM_ELSE	16
#define TERM_WHILE	17
#define TERM_RETURN	18
#define TERM_MAIN	19
#define OP_INC		20
#define OP_REL		21
#define OP_LOG		22
#define OP_MAT		23
#define IF			24
#define FOR			25
#define WHILE		26
#define RETURN		27
#define PARAM		28
#define TIPO		29
#define FUNCOES		30
#define FUNCAO		31
#define DECL_VAR	32
#define DECL_PAR	33
#define CMDS		34
#define EXP_REL		35
#define EXP_MAT		36
#define OPER		37
#define ATRIB		38
#define CH_FUNC		39
#define OPERAN_MAT	40
#define MAIN		41
#define PROG		42
#define VELHA		43

#define TAM_SLR		119
#define N_SIMBOLOS	43
#define NUMCHARS	100
#define TAM_REDUZ	30


typedef struct operador
{
    char * id_token;
    int op_tipo;
}TOperador;


 typedef struct reduz
{
	int num;
	int esquerda;
	int direita[30];
}reduz;

typedef struct type
{
	char *id;
	char *valor;
	char *tipo;
	struct type *prox;
}*type;

typedef struct tipo{
	struct type *prim;
}*tipo;

//static tipo lista_tipos[100];

struct stack
{
	int elemento;
	struct stack *ant,*prox;
};
typedef struct stack* pilha;

static pilha topo;




#endif
